/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package escom.ipn.modelo.facade;

import escom.ipn.modelo.dao.adminCRPDAO;
import escom.ipn.modelo.dto.CRPClass;
import escom.ipn.modelo.dto.RadioClass;
import java.sql.Connection;
import java.sql.SQLException;
import java.util.List;

/**
 *
 * @author db2admin
 */
public class adminCRPFacade  {
    private Connection cnn;
    private adminCRPDAO dao;

    public adminCRPFacade (Connection cnn) {
        this.cnn=cnn;
        dao= new adminCRPDAO ();
    }  
    public void guardar(CRPClass a)
            throws SQLException{
         dao.insertCRP(a, cnn);
    } 
    
    public void update(CRPClass a)
            throws SQLException{
         dao.updateCRP(a, cnn);
    }

    public List mostrarTodos()
            throws SQLException{
         return dao.loadAll(cnn);
    }

    public void borrarUsuario(CRPClass a) throws SQLException{
          dao.borrarCRP(a,cnn);
    }

    public List loadSelect(CRPClass a) throws SQLException{
        return dao.loadSelect(a,cnn);
    }

    public List getCRPs() throws SQLException {
        return dao.getCRPs(cnn);
    }

    public List getCRPNombre(CRPClass a) throws SQLException {
        return dao.getCRPNOMBRE(a,cnn);
    }

    public List getCRPID(CRPClass a) throws SQLException {
        return dao.getCRPID(a,cnn);
    }
    
    public void asignacion(CRPClass a) throws SQLException {
        dao.asignacion(a,cnn);
    }


}


